#!/bin/bash

echo "compiling..."

javac *.java

if [[ $? -eq 0  ]]
then
    echo "compiled successfully"
	echo "building jar file..."
    jar cvfm grimwepa1.10a6.jar mymanifest *.class default_pw.txt README grimwepa.xpm gw_splash.jpg charset.lst GUIDE >> /dev/null
	echo "executing..."
	echo ""
    java -jar grimwepa1.10a6.jar $1
else
    echo "errors occurred while compiling"
fi
